load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "colenc",
    srcs = [
        "encode.go",
        "inverted.go",
        "key.go",
        "legacy.go",
        "value.go",
    ],
    importpath = "github.com/cockroachdb/cockroach/pkg/sql/colenc",
    visibility = ["//visibility:public"],
    deps = [
        "//pkg/col/coldata",
        "//pkg/col/typeconv",
        "//pkg/keys",
        "//pkg/roachpb",
        "//pkg/settings",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/catalogkeys",
        "//pkg/sql/catalog/catenumpb",
        "//pkg/sql/catalog/descpb",
        "//pkg/sql/catalog/fetchpb",
        "//pkg/sql/colexecerror",
        "//pkg/sql/row",
        "//pkg/sql/rowenc",
        "//pkg/sql/rowenc/keyside",
        "//pkg/sql/rowenc/valueside",
        "//pkg/sql/rowinfra",
        "//pkg/sql/sem/catid",
        "//pkg/sql/sem/tree",
        "//pkg/sql/sqlerrors",
        "//pkg/sql/types",
        "//pkg/util/buildutil",
        "//pkg/util/encoding",
        "//pkg/util/intsets",
        "//pkg/util/json",
        "//pkg/util/uuid",
        "@com_github_cockroachdb_errors//:errors",
    ],
)

go_test(
    name = "colenc_test",
    srcs = [
        "bench_test.go",
        "encode_test.go",
        "main_test.go",
    ],
    data = ["//c-deps:libgeos"],
    deps = [
        ":colenc",
        "//pkg/base",
        "//pkg/ccl",
        "//pkg/ccl/utilccl",
        "//pkg/cli/clisqlclient",
        "//pkg/col/coldata",
        "//pkg/col/coldataext",
        "//pkg/keys",
        "//pkg/roachpb",
        "//pkg/security/securityassets",
        "//pkg/security/securitytest",
        "//pkg/security/username",
        "//pkg/server",
        "//pkg/settings",
        "//pkg/settings/cluster",
        "//pkg/sql/catalog",
        "//pkg/sql/catalog/catalogkeys",
        "//pkg/sql/catalog/desctestutils",
        "//pkg/sql/colconv",
        "//pkg/sql/colexecerror",
        "//pkg/sql/pgwire/pgcode",
        "//pkg/sql/pgwire/pgerror",
        "//pkg/sql/randgen",
        "//pkg/sql/row",
        "//pkg/sql/sem/eval",
        "//pkg/sql/sem/tree",
        "//pkg/sql/types",
        "//pkg/testutils/serverutils",
        "//pkg/testutils/sqlutils",
        "//pkg/testutils/testcluster",
        "//pkg/util",
        "//pkg/util/leaktest",
        "//pkg/util/log",
        "//pkg/util/randutil",
        "//pkg/util/timeutil/pgdate",
        "@com_github_cockroachdb_apd_v3//:apd",
        "@com_github_stretchr_testify//require",
    ],
)
